package com.yisu.auction.api.domain.vo.indexPackageVos;

import org.apache.commons.lang.StringUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 * author: 赵杰
 * Business Description： 奖品列表单一实体
 * createTime：2017/8/11
 */
public class PrizeListVo {

    private Long prizeId;

    private String name;

    private BigDecimal price;

    private String image;

    private Byte isTen;

    private Integer term;

    //1 进行中 2 等待揭晓 3已经揭晓
    private Integer status;

    private String nickname;//最后出价人

    private String ico;//出价人头像

    private BigDecimal transactionPrice;//当前竞拍价

    private String offerPriceDate;//最后出价时间

    private int beginCountDown;//开始倒计时

    private Long nextPeriodPrizeId;//下期竞品ID

    private Integer collectStatus;//收藏状态

    public Long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(Long prizeId) {
        this.prizeId = prizeId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public Byte getIsTen() {
        return isTen;
    }

    public void setIsTen(Byte isTen) {
        this.isTen = isTen;
    }

    public Integer getTerm() {
        return term;
    }

    public void setTerm(Integer term) {
        this.term = term;
    }

    public Integer getStatus() {
        if (status == 2)
            status = 1;
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getNickname() {
        if (StringUtils.isEmpty(nickname)) {
            return "匿名";
        }
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getIco() {
        return ico;
    }

    public void setIco(String ico) {
        this.ico = ico;
    }

    public String getOfferPriceDate() {
        return offerPriceDate;
    }

    public void setOfferPriceDate(String offerPriceDate) {
        this.offerPriceDate = offerPriceDate;
    }

    public int getBeginCountDown() {
        return beginCountDown;
    }

    public void setBeginCountDown(int beginCountDown) {
        this.beginCountDown = beginCountDown;
    }

    public Long getNextPeriodPrizeId() {
        if (nextPeriodPrizeId == null)
            return Long.valueOf(0);
        return nextPeriodPrizeId;
    }

    public void setNextPeriodPrizeId(Long nextPeriodPrizeId) {
        this.nextPeriodPrizeId = nextPeriodPrizeId;
    }

    public Integer getCollectStatus() {
        return collectStatus;
    }

    public void setCollectStatus(Integer collectStatus) {
        this.collectStatus = collectStatus;
    }

    public BigDecimal getTransactionPrice() {
        if (transactionPrice == null)
            return BigDecimal.valueOf(0);
        return transactionPrice;
    }

    public void setTransactionPrice(BigDecimal transactionPrice) {
        this.transactionPrice = transactionPrice;
    }

    @Override
    public String toString() {
        return "PrizeListVo{" +
                "prizeId=" + prizeId +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", image='" + image + '\'' +
                ", isTen=" + isTen +
                ", term=" + term +
                ", status=" + status +
                ", nickname='" + nickname + '\'' +
                ", ico='" + ico + '\'' +
                ", transactionPrice=" + transactionPrice +
                ", offerPriceDate='" + offerPriceDate + '\'' +
                ", beginCountDown=" + beginCountDown +
                ", nextPeriodPrizeId=" + nextPeriodPrizeId +
                ", collectStatus=" + collectStatus +
                '}';
    }
}
